package com.zmn.mcc.admin.controller.test;

import com.taobao.api.ApiException;
import com.zmn.common.dto2.ResponseDTO;
import com.zmn.mcc.admin.controller.MccBaseController;
import com.zmn.mcc.business.interfaces.staff.dingtalk.DingTalkService;
import com.zmn.mcc.model.entity.staff.dingtalk.StaffDingTalk;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * 员工权限测试
 * @author heguanghua
 * @since 2020/06/04 09:58
 */
@Controller
@RequestMapping("/test/dingtalk")
public class DingTalkTestController extends MccBaseController {

    @Resource
    private DingTalkService dingTalkService;


    /**
     * 测试修改
     */
    @RequestMapping(value = "updateUser")
    @ResponseBody
    public ResponseDTO updateUser(StaffDingTalk staffDingTalk) throws ApiException {
        ResponseDTO<String> stringResponseDTO = dingTalkService.updateDingDingUser(staffDingTalk);
        return stringResponseDTO;
    }

}
